package interp;

import ic.ast.PrimitiveType.DataType;

public class TypedValue {
	public TypedValue(DataType dataType, int dimension) {
		this(dataType, null, dimension);
		this.initialized = false;
	}

	public TypedValue(DataType dataType, Object value, int dimension) {
		this.type = dataType;
		this.value = value;
		this.dimension = dimension;
		this.initialized = true;
	}

	public DataType type;
	public boolean initialized;
	public int dimension;

	private Object value;

	// For arrays dimensions of type > 0 and value is an array

	public Object getValue() {
		return value;
	}

	public void setValue(Object value) {
		this.value = value;
		this.initialized = true;
	}

}
